package com.quiz.bis.domain.bo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.quiz.common.core.domain.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
public class ExamBo extends BaseModel {

    private static final long serialVersionUID = 1L;

    private Long id;

    private Long examGroupId;

    private String title;

    private Integer type; // 1-考试 2-测评 3-作业

    private Long paperId;

    @NotNull(message = "状态不能为空")
    @Range(min = 0, max = 1, message = "状态只能是0(草稿)或1(已发布)")
    private Integer status;

    private Boolean needIdentity;

    private Integer timeLimit;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date startTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date endTime;

    private ExamConfig configJson;

    List<Long> subgroupIds;
    List<Long> excludedUserIds;
}
